#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>

#include "libika.h"

using namespace atomic;

int main() {

	// test 01 : IkaTileGraphic
	// IkaTileGraphic(IkaString("mojo.png"));

	// test 02 : create an IkaAnim
	//atomic::IkaAnim anim1("anim1", "frame1.png");

	// test 3 : Ikanim::AddFrame


	// test 4 : create the IkaCore based o this anim
	// atomic::IkaCore core1(12,12,anim1);
	// create the window


	atomic::IkaClient win1;
	// add the core to the win
	//win1.Add(core1);
	//main loop
	win1.MainLoop();

	//constructeur par copie : passage de pointeur (p)
	// m_arme pointeur vers Arme
	//m_arme = new Arme(*(personnageACopier.m_arme));





	/*
	sf::RenderWindow App(sf::VideoMode(800, 600), "SFML window");

	// Load a sprite to display
	sf::Image Image;
	if (!Image.LoadFromFile("img/mojo.png"))
		return EXIT_FAILURE;
	sf::Sprite Sprite(Image);

	// Start the game loop
	while (App.IsOpened()) {
		// Process events
		sf::Event Event;
		while (App.GetEvent(Event)) {
			// Close window : exit
			if (Event.Type == sf::Event::Closed)
				App.Close();
		}

		// Clear screen
		App.Clear();

		// Draw the sprite
		App.Draw(Sprite);

        // Update the window
        App.Display();
    }
	*/

		return 0;
	}
	/*

	 #include <iostream>
	 #include <vector>

	 // module fenetre : gestion fenetre / event / gestion du temps / framerate
	 #include <SFML/Window.hpp>
	 // module graphique : 2D /Sprites
	 #include <SFML/Graphics.hpp>
	 // module system
	 #include <SFML/System.hpp>

	 #include "IkaClient.h"
	 #include "IkaServer.h"
	 #include "IkaPlayer.h"
	 #include "Anim.h"
	 #include "DLMap.h"
	 #include "ImgAnim.h"
	 #include "Layer.h"
	 #include "LayerAnim.h"
	 #include "Map.h"
	 #include "MapLayer.h"


	 using namespace std;

	 int main()
	 {
	 // Create the main window
	 sf::RenderWindow App(sf::VideoMode(800, 600, 32), "iKa");

	 // Get a reference to the input manager associated to our window, and store it for later use
	 const sf::Input& Input = App.GetInput();

	 // Start main loop
	 while (App.IsOpened())
	 {
	 // Process events
	 sf::Event Event;
	 while (App.GetEvent(Event))
	 {
	 // screenshot
	 if (Event.Key.Code == sf::Key::F1)
	 {
	 sf::Image Screen = App.Capture();
	 Screen.SaveToFile("screenshot.jpg");
	 }

	 // Close window : exit
	 if (Event.Type == sf::Event::Closed)
	 App.Close();

	 // Escape key : exit
	 if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
	 App.Close();
	 }

	 // Efface l'écran (remplissage avec du noir)
	 App.Clear();
	 // Display window on screen
	 App.Display();
	 }
	 return EXIT_SUCCESS;
	 }
	 */
